import request from '@/utils/request'

// 查询货币单位列表
export function listMonetary(query) {
  return request({
    url: '/depot/monetary/list',
    method: 'get',
    params: query
  })
}

// 查询货币单位详细
export function getMonetary(monetaryId) {
  return request({
    url: '/depot/monetary/' + monetaryId,
    method: 'get'
  })
}

// 新增货币单位
export function addMonetary(data) {
  return request({
    url: '/depot/monetary',
    method: 'post',
    data: data
  })
}

// 修改货币单位
export function updateMonetary(data) {
  return request({
    url: '/depot/monetary',
    method: 'put',
    data: data
  })
}

// 删除货币单位
export function delMonetary(monetaryId) {
  return request({
    url: '/depot/monetary/' + monetaryId,
    method: 'delete'
  })
}
